is_power_of_two Function

public pure elemental function is_power_of_two(n) result(rst)

Tests to see if a value is an integer power of two.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: n

The value to test.

Return Value logical

Returns true if n is a power of two; else, false.